<%@ page language="java" contentType="text/html; charset=UTF-8"  pageEncoding="UTF-8"%>
$(function(){
	$("#saveButton").click(function(){
		var fCnName = $("#FcnName").val();
		var fStudentId = $("#FstudentId").val();
		var fCollege = $("#Fcollege").val();
		var fTheClass = $("#FtheClass").val();
		
		var jCnName = $("#JcnName").val();
		var jStudentId = $("#JstudentId").val();
		var jCollege = $("#Jcollege").val();
		var jTheClass = $("#JtheClass").val();
		
		var title = $("#title").val();
		var content = $("#content").val();
		if(fCnName!="" && fStudentId!="" && fCollege!="" && fTheClass!="" && jCnName!="" && jStudentId!="" && jCollege!="" && jTheClass!="" && title!="" && content!=""){
			$.ajax({
				type:'POST',
				url:'mailSystemAddDate.action',
				data:{fCnName:fCnName,fStudentId:fStudentId,fCollege:fCollege,fTheClass:fTheClass,jCnName:jCnName,jStudentId:jStudentId,jCollege:jCollege,jTheClass:jTheClass,title:title,content:content},
				datatype:'json',
				success:function(msg){
					if(msg.status == "200"){
						$.messager.confirm({
							title:'提示',
							msg:'发送成功',
							fn:function(r){
								if(r){
									parent.closeDialog();
								}else{
									parent.closeDialog();
								}
							}
						});
						
					}else{
						$.messager.alert("提示","发送失败");
					}
				}
			});
		}
	});
});
